package edu.gznu.ics.fast.common.UIHelper;

import edu.gznu.ics.fast.pulsar.model.vo.prestoacc.knowPulsar.KnownPulsarCandidateVO;
import edu.gznu.ics.fast.pulsar.model.vo.web.QueryCommandVO;

import java.util.List;

/**
 * Created by fei-zyx on 2016/11/13.
 */
public class CandCompareQueryPagiNationHelper extends  PagiNationHelper<QueryCommandVO,KnownPulsarCandidateVO> {
    @Override
    public int getPageIndex(List inputVO) {
        return ((QueryCommandVO)(inputVO.get(0))).getQueryIndex();
    }

    @Override
    public KnownPulsarCandidateVO makePagePartMessage(int part, int size, int existNextPart) {
        KnownPulsarCandidateVO pagePartMessage = new KnownPulsarCandidateVO();
        pagePartMessage.setPart(Integer.toString(part));
        pagePartMessage.setExistNextPart(Integer.toString(existNextPart));
        pagePartMessage.setSize(Integer.toString(size));
        return pagePartMessage;
    }
}
